@extends('admin.main')
@section('content')
    <div class="admin-biaogelist">
        <div class="daohang">
            <ul>
                <li>
                    <button type="button" class="am-btn am-btn-default am-radius am-btn-xs"> 交易明细管理</button>
                </li>
            </ul>
        </div>
        <div class="listbiaoti am-cf">
            <ul class="am-icon-flag on"> 交易明细</ul>

            <dl class="am-icon-home" style="float: right;"> 当前位置： 首页 > <a href="#">交易列表</a></dl>

        </div>
        <div class="am-btn-toolbars am-btn-toolbar am-kg am-cf">
            <ul>

                <form action="{{urlAdmin('paylog','getIndex')}}">
                    <li style="margin-right: 0;">
                        <span class="tubiao am-icon-calendar"></span>
                        <input type="text" class="am-form-field am-input-sm am-input-zm  am-icon-calendar" placeholder="开始日期" data-am-datepicker="{theme: 'success',}" name="start" readonly/>
                        <span class="tubiao am-icon-calendar"></span>
                        <input type="text" class="am-form-field am-input-sm am-input-zm  am-icon-calendar" placeholder="结束日期" data-am-datepicker="{theme: 'success',}" name="end" readonly/>
                    </li>
                    <li><button type="submit" class="am-btn am-radius am-btn-xs am-btn-success" style="margin-top: -1px;">搜索</button></li>
                </form>
            </ul>
        </div>
        <form class="am-form am-g">
            <table width="100%" class="am-table am-table-bordered am-table-radius am-table-striped">
                <thead>
                <tr class="am-success">
                    <th class="table-id">ID</th>
                    <th class="table-type">昵称</th>
                    <th class="table-author">类别</th>
                    <th class="table-date am-hide-sm-only">金额</th>
                    <th class="table-date am-hide-sm-only">时间</th>
                </tr>
                </thead>
                <tbody>
                @if(!empty($res['data']))
                    @foreach($res['data'] as $v)
                        <tr>
                            <td>{{$v['id']}}</td>
                            <td><a href="#">{{$v['user']['wx_name']}}</a></td>
                            <td class="am-hide-sm-only">@if($v['type']==0) 预约挂号 @else 充值 @endif</td>
                            <td class="am-hide-sm-only">@if($v['type']==0){{$v['charge']['money']}}  @else {{$v['order']['register_price']}} @endif</td>
                            <td class="am-hide-sm-only">{{date('Y-m-d H:i:s',$v['add_time'])}}</td>
                        </tr>
                     @endforeach
                     @else
                     <tr>
                         <td colspan="5" align="center">暂无数据</td>
                     </tr>
                @endif
                </tbody>
            </table>
            <ul class="am-pagination am-fr">
                @if(isset($res['prev_page_url']))
                    <li><a href="{{$res['prev_page_url']}}">«</a></li>
                @endif
                @foreach($res['pageNoList'] as $v)
                    @if($res['current_page']==$v)
                    <li class="am-active"><a href="{{urlAdmin("paylog",'getIndex')}}?page={{$v}}">{{$v}}</a></li>
                    @else
                        <li><a href="{{urlAdmin("paylog",'getIndex')}}?page={{$v}}">{{$v}}</a></li>
                    @endif
                @endforeach
                    @if(isset($res['next_page_url']))
                        <li><a href="{{$res['next_page_url']}}">»</a></li>
                    @endif
            </ul>
    @include('admin.footer')
@endsection